import { createApp } from 'vue'
import App from '@/App.vue'
// 获取element-plus插件与样式
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'

// 配置element-plus国际化
// @ts-ignore
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'

// 引入自定义插件对象：注册整个项目全局组件
import globalComponent from '@/components/index'

import '@/styles/index.scss'
import router from '@/router'
import pinia from './store'
import './permission.ts'
// 获取应用实例对象
const app = createApp(App)

console.log(import.meta.env);
// import 'virtual:svg-icons-register'
app.use(pinia)
app.use(router)
app.use(globalComponent)

// 将应用挂在道挂载点上
app.use(ElementPlus, {
    locale: zhCn
})

app.mount('#app')
